<?php
	require "settings/config.php";
	require "layout.php";
	require "includes/session.php";
	require "includes/sql_functions.php";
	require "includes/slot_functions.php";
	require "includes/game_functions.php";
	require "includes/scen_functions.php";
	require "includes/misc_functions.php";
	
	oh_require_admin();

	if($_POST['scenario']!="" && $_POST['location']!="" && $_POST['slot']>0 && $_POST['numtables']>0)
	{
		oh_game_add($_POST['scenario'],$_POST['slot'],$_POST['location'],$_POST['numtables'],$_POST['tablesize']*$_POST['numtables'],$_POST['numtables']+$_POST['extragms']);
	}
	
	header('Location: games.php');
	
?>